package com.example.gymmanagement.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName notify
 */
@TableName(value ="notify")
@Data
public class Notify implements Serializable {
    /**
     * 公告id
     */
    @TableId(value = "notify_id",type=IdType.AUTO)
    private Long notifyId;

    /**
     * 公告标题
     */
    @TableField(value = "notify_titile")
    private String notifyTitile;

    /**
     * 公告详情
     */
    @TableField(value = "notify_content")
    private String notifyContent;

    /**
     * 公告html
     */
    @TableField(value = "notify_html")
    private String notifyHtml;

    /**
     * 公告类型
     */
    @TableField(value = "notify_type")
    private String notifyType;

    /**
     * 公告作者
     */
    @TableField(value = "notify_author")
    private Long notifyAuthor;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Notify other = (Notify) that;
        return (this.getNotifyId() == null ? other.getNotifyId() == null : this.getNotifyId().equals(other.getNotifyId()))
            && (this.getNotifyTitile() == null ? other.getNotifyTitile() == null : this.getNotifyTitile().equals(other.getNotifyTitile()))
            && (this.getNotifyContent() == null ? other.getNotifyContent() == null : this.getNotifyContent().equals(other.getNotifyContent()))
            && (this.getNotifyHtml() == null ? other.getNotifyHtml() == null : this.getNotifyHtml().equals(other.getNotifyHtml()))
            && (this.getNotifyType() == null ? other.getNotifyType() == null : this.getNotifyType().equals(other.getNotifyType()))
            && (this.getNotifyAuthor() == null ? other.getNotifyAuthor() == null : this.getNotifyAuthor().equals(other.getNotifyAuthor()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getNotifyId() == null) ? 0 : getNotifyId().hashCode());
        result = prime * result + ((getNotifyTitile() == null) ? 0 : getNotifyTitile().hashCode());
        result = prime * result + ((getNotifyContent() == null) ? 0 : getNotifyContent().hashCode());
        result = prime * result + ((getNotifyHtml() == null) ? 0 : getNotifyHtml().hashCode());
        result = prime * result + ((getNotifyType() == null) ? 0 : getNotifyType().hashCode());
        result = prime * result + ((getNotifyAuthor() == null) ? 0 : getNotifyAuthor().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", notifyId=").append(notifyId);
        sb.append(", notifyTitile=").append(notifyTitile);
        sb.append(", notifyContent=").append(notifyContent);
        sb.append(", notifyHtml=").append(notifyHtml);
        sb.append(", notifyType=").append(notifyType);
        sb.append(", notifyAuthor=").append(notifyAuthor);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}